# coding:utf-8
from selenium.webdriver.support.wait import WebDriverWait
from util.get_by_local import GetByLocal
# from base.app import App
from base.base_driver import BaseDriver
import sys
sys.path.append('D:\\test\\Appium2021')

class MainPage:
    def __init__(self, i):
        app_driver = BaseDriver()
        self.driver = app_driver.android_driver(i)
        self.get_by_local = GetByLocal(self.driver)
    def to_local_device(self):
        return self.get_by_local.get_element("local_device", "main_element")
    def to_cloud_device(self):
        return self.get_by_local.get_element("cloud_device", "main_element")

    def to_haiwell(self):
        return self.get_by_local.get_element("haiwell", "main_element")

    def to_message(self):
        return self.get_by_local.get_element("message", "main_element")

    def to_my(self):
        return self.get_by_local.get_element("my", "main_element")
